import request from "@/plugins/service";

export function findAll() {
  return request({
    url: '/database/link',
    method: 'GET'
  })
}

function saveOne(data) {
  return request({
    url: '/database/link',
    method: 'PUT',
    data
  })
}

function deleteOne(id) {
  return request({
    url: '/database/link/' + id,
    method: 'DELETE',
  })
}

function testLink(data) {
  return request({
    url: '/database/link/test',
    method: 'POST',
    data
  })
}

export default {
  findAll,
  saveOne,
  deleteOne,
  testLink,
}
